# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer:
pkgname=py3-flask-compress
_pkgorig=flask_compress
pkgver=1.17
pkgrel=0
pkgdesc="Compress responses of your Flask application"
url="https://github.com/colour-science/flask-compress"
arch="noarch"
license="MIT"
depends="python3 py3-brotli py3-flask py3-zstandard"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-flask-caching py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/f/flask_compress/flask_compress-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
58d66f7be21117ad2769743c148b7df6981634341d1ffa1c6c71aabd86119364e85a8242297e6f369b02ecf09ccdd3980806e91c869754f917d0bd83ae7b9b5d  py3-flask-compress-1.17.tar.gz
"
